package homework.Collection_Class;


import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class HashSet_CommonMethods {
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        String strings=scanner.nextLine();
        String []str=strings.split(",");
        Set<String> hashSet=new HashSet<String>();
        for(String s:str){
            hashSet.add(s);
        }
        if(hashSet.size()>4){
            if(hashSet.contains("hello")){
                System.out.println("集合中已有该元素");
            }else{
                hashSet.add("hello");
            }
        }else{
            System.out.println("元素个数小于4");
        }
        System.out.println(hashSet);
    }
}
